<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<SCRIPT src="../../templates/js/myweb.js"></SCRIPT>
<script language="javascript" type="text/javascript">
<!--
 function check_all( flag)
 {
     var obj = document.getElementsByName("del_id[]");
	 if( flag == "default")
	 {
	   flag = ! obj[0].checked;
	 }
	 for(var i=0; i<obj.length; i++)
	 {
	   obj[i].checked = flag;
	 }	 
 }
 function del_cates()
 {
     var obj = document.getElementsByName("del_id[]");
	 var delflag = false;
	 for(var i=0; i<obj.length; i++)
	 {
	   if( obj[i].checked )
	   {
	     delflag = true;
		 break;
	   }
	 }	 
	 if( ! delflag)
	 {
	    alert("請選擇要删除的分类!");
		return false;
	 }
	 return window.confirm("您確認要刪除這個分類嗎?這將不能恢復??");
 }
//-->
</script>
<div id="listDiv">
  <table width="98%" border="0" cellpadding="0" cellspacing="0" class="table1">
    <tr>
      <th width="4%"><input type="checkbox" onClick="check_all( 'default')" name="checkall" /></th>
      <th width="50%">分類名稱</th>
      <th width="10%">排序</th>
      <th width="15%">子分類</th>
      <th>操作</th>
    </tr>
	<form action="./news_cate.php?mode=del_cate" method="post" onsubmit="return del_cates()">
    <!-- BEGIN CATE_LIST -->
    <tr class="{CSS_TR}" onmouseover="rowOverEffect(this)" 
                    onmouseout="rowOutEffect(this)">
      <td class="dataTableContent"><input type="checkbox" name="del_id[]" value="{CATE_ID}"/></td>
      <td onclick="location.href='{VIEW_URL}'">{CATE_CNAME}</td>
      <td onclick="location.href='{VIEW_URL}'">{SORT_ID}</td>
      <td onclick="location.href='{VIEW_URL}'"><a href="{SON_URL}">{SON_NUM}</a> 個</td>
      <td width="21%">
	   <a href="{VIEW_URL}"><img src="../../templates/images/icon_view.gif" border="0" alt="查看" /></a>
	   <a href="{EDIT_CATE}"><img src="../../templates/images/editapproveicon.gif" border="0" alt="編輯" /></a> 
	   <a href="{ADD_SON}"><img src="../../templates/images/add.gif" border="0" alt="添加子分類" /></a>
      <img src="../../templates/images/{IMG_NAME}" border="0" height="13" width="13"/></td>
    </tr>
    <!-- END CATE_LIST -->
    <tr>
      <td colspan="5">
	  <input name="btn_all2" type="button" id="btn_all2" value="全選" 
	   onClick="javascript:check_all( true);" class="back"/> 
        <input name="btn_cancel" type="button" id="btn_cancel" value="取消" 
	   onClick="javascript:check_all( false);" class="back" /> 
        <input class="del" type="submit" value="刪除" style="padding-left:10px" /></td>
    </tr>
	</form>
    <tr>
      <td height="30" colspan="5">
	  <div align="center">
          <!-- BEGIN BLO_RETURN -->
          <input name="btn_ret" type="submit" id="btn_ret" value="返 回" onclick="{RETURN_URL}" class="bot" />
          <!-- END BLO_RETURN -->
        </div></td>
    </tr>
  </table>
</div>
<script type="text/javascript" src="../../templates/js/tab_js.js"></script> 